home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 53
/
053.d81
/
morse code
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
261 lines
10 gosub2130:print"[147]":poke53281,.:poke53280,.
20 diml$(38),m$(38),w$(200),l1$(38),h$(200):print"[147]"," [208]lease wait
30 s1[178]54272:[129]l[178]s1[164]s1[170]24:[151]l,.:[130]:[151]s1[170]24,15:[151]s1[170]5,.
40 [151]s1[170]6,240:[151]s1[170]3,8:[129]l[178].[164]8:[135]a(l):[130]:dt$[178]".":ds$[178]"-"
50 [129]l[178]0[164]38:[135]l$(l),m$(l):l1$(l)[178][199]([198](l$(l))[170]128):[130]
60 sp$[178]" "
70 [135]w$(z):[139]w$(z)[179][177]"#"[167]z[178]z[170]1:[137]70
80 [135] h$(t)
90 [139]h$(t)[178]"#"[167]h$(t)[178]h$(t[171]1)
100 [139]h$(t)[179][177]"%"[167]t[178]t[170]1:[137]80
110 pu[178]z:[153]"stopload"[199](8)[199](14):[141]390:l5[178].:m5[178].:k[178].:tl$[178]""
120 [153]"sys right$nternational (NULL)orse lenode (NULL)ranslater":
130 [153][163]10)"listpeeky mid$ames len. right$anni
140 print"[159] [205]enu[146]"
150 print" [153]1.[150] [211]ee chart"
160 print" [153]2.[150] [212]ranslate from [197]nglish to [205]orse":c$="[144]"
170 print" [153]3.[150] [212]ranslate from [205]orse to [197]nglish"
180 print" [153]4.[150] [212]est your ability to translate"
190 print" [153]5.[150] [195]ustomize [205]orse [195]ode keys"
191 print" [153]6.[150] [209][213][201][212]":gosub390
200 print" [208]lease select your choice :":print""sp$
210 geta$:ifa$=""then210
220 ifa$<"1"ora$>"6"then210
230 lc=s1+1309+(val(a$)-1)*80:forl=lctolc+34:pokel,1:next:ford=1to300:next
240 onval(a$)goto770,870,1140,1490,3000,1420
250 print"[175][153][157]";:t$="":p$="":ct=0:c1=0
260 geta$:gosub360:ifa$=""then260
270 l=len(t$):a=asc(a$):if(a=47ora=63)andtt=1thengosub2000:goto260
280 ifa=13andl>.thenprint" ";:return
290 if(a=20ora=95)andl>.thent$=left$(t$,l-1):a$=chr$(20):goto350
300 ifa$=" "andl<tl+1then340
310 ifl>tlthen260
311 ifm5=0then330
312 ifa=asc(ds$)thena=45:a$=chr$(a)
313 ifa=asc(dt$)thena=46:a$=chr$(a)
320 ifa<>45anda<>46then260
330 ifl5=1thenif(a<65ora>90)and(a<48ora>57)and(a<>46)and(a<>63)and(a<>44)then260
340 t$=t$+a$:ifm5=1thengosub450
350 print"[153]"a$;:print"[175][153][157]";:goto260
360 ct=ct+1:ifct<3thenreturn
370 ct=.:c1=c1+1:ifc1>8thenc1=.
380 poke646,a(c1):print"[175][157]";:return
390 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][154]";:return
400 print".";
410 pokes1+1,50:pokes1+4,65:fort=1to73:next:pokes1+4,64:return
420 print"-";
430 pokes1+1,50:pokes1+4,65:fort=1to187:next:pokes1+4,64:return
440 fort=1to163:next:return
450 ifa$="."thengosub410:return
460 ifa$="-"thengosub430:return
470 return
480 data0,11,12,15,1,1,12,11,0
490 dataa,.-,b,-...,c,-.-.,d,-..,e,.,f,..-.,g,--.,h,....,i,..,j,.---
500 datak,-.-,l,.-..,m,--,n,-.,o,---,p,.--.,q,--.-,r,.-.,s,...,t,-
510 datau,..-,v,...-,w,.--,x,-..-,y,-.--,z,--..
520 data0,-----,1,.----,2,..---,3,...--,4,....-,5,.....,6,-....,7,--...
530 data8,---..,9,----.,",",--..--,".",.-.-.-,?,..--..
540 datathe,quick,brown,fox,jumped,over,three,lazy,dogs,hello,help
550 datastranded,island,mayday,send,off,on,goodby,monday,tuesday,thursday
560 datafriday,saturday,sunday,wednesday,september,october,november,december
570 datajanuary,february,march,april,may,june,july,august,summer,winter,fall
580 dataspring,computer,softdisk,yesterday,tomorrow,today,yellow,blue,red
590 datagreen,copper,iron,gold,silver,bomb,explosive,dynamite,big,small,little
600 data123,234,345,456,567,678,789,890,153,523,764,".",","
610 datagiant,guard,ocean,pool,window,pencil,pen,whale,shark,football,baseball
620 data"#"
630 dataan article,adjective,color,animal,past verb,adverb,spelled out number
640 dataadjective,animal,greeting,"*[211]end [198]or ----!"
650 data"*[212]his usually happens on a island","*[193] piece of land",help signal
660 dataverb,adverb,adverb,"*[193]dios!","*[196]ay of a week","#"
670 data"#","#","#","#","#","month","#","#","#","#","#","#","#","#","#","#","#"
680 dataseason,"#","#","#","*[217]ou are now playing with this","*[193]n awesome company"
690 data"*[206]ot tomorrow","*[206]ot yesterday","*[201]t's a news show",color,"#","#"
700 data"#",metal,"#","#","#","*[203][193][193][208][207][207][215]!","*[203][193][193][194][207][207][205]!","*[203][193][193][208][207][215][201][197]",adjective
710 data"#","#",number,"#","#","#","#","#","#","#","#","#","#",punctuation,"#"
720 dataadjective,verb,"*[199]igantic body of water","*[204]ots of [195]hlorine"
730 data"*[217]ou look through this","*[217]ou write with this"
740 data"#",mammal,fish,"*[201]t's usually played in winter"
750 data"*[201]t's usually played in spring"
760 data"%"
770 print"[147][159] [201]nternational [205]orse [195]ode [195]hart":gosub390:print""
780 forl=0to12:print" "l1$(l)" "m$(l)tab(15)""l1$(l+13)" "m$(l+13)tab(28);
790 print""l$(l+26)" "m$(l+26):next:ifrtthenrt=0:return
800 print""
810 print"[158] [208]ress [193]ny [203]ey ";:poke198,0
820 wait198,255:poke198,0:goto110
830 foru=1to10
840 fort=1264+l-len(tl$)to1264+l-1:poket,peek(t)and127:poket+s1,7:next
850 fort=1264+l-len(tl$)to1264+l-1:poket,peek(t)or128:poket+s1,10
860 next:next:pokes1+4,32:l=l+1:tl$="":k=.:goto1270
870 l5=1:tl=78+80
880 print"[147][159][212]ype in an [197]nglish sentence then ":x1=0:c$="[159]"
890 print"press [150][210][197][212][213][210][206][146][159] when done."
900 gosub250:print:gosub1340
910 forl=1tolen(t$):p$=mid$(t$,l,1)
920 ifp$=chr$(32)then1040
930 k=k+1
940 ifp$=l$(k-1)then980
950 ifk<39then930
960 ifrtthenrt=0:return
970 goto800
980 ifpos(x)>33andc$="[159]"thenprint:print"":poke199,1:x1=x1+1:ifx1>3thenx1=.:goto1000
990 m$=m$(k-1):print"[145]"c$;p$"[157][157]";:gosub1100:k=0:nextl:goto960
1000 print""
1010 print"[129] [208]ress any key to continue. ":poke198,0:wait198,255
1020 x1=0:print"[145][146] ":gosub1340
1030 goto980
1040 ifpos(x)>33thenprint:print"":poke199,1:x1=x1+1:ifx1>3thenx1=0:goto1060
1050 print" ";:gosub440:k=0:nextl:goto960
1060 print""
1070 print"[129] [208]ress any key to continue. ":poke198,0:wait198,255
1080 x1=0:print"[145][146] ":gosub1340
1090 k=0:nextl:goto960
1100 print" ";:form=1tolen(m$):p$=mid$(m$,m,1)
1110 ifp$="-"thengosub420
1120 ifp$="."thengosub400
1130 next:return
1140 m5=1:tl=150:sp=0
1150 print"[147][159][212]ype in [205]orse [195]ode press [210][197][212][213][210][206][146][159]"
1160 print" when done.":gosub1300:poke214,10:print:rt=1:gosub780
1170 print"":gosub250:print:gosub1380
1180 forl=1tolen(t$):p$=mid$(t$,l,1):ifp$=" "andtl$=""thenprint" ";:nextl:goto1260
1190 ifp$=" "orp$=""thengosub1210:nextl:goto1260
1200 tl$=tl$+p$:nextl:sp=1
1210 k=.
1220 k=k+1
1230 iftl$=m$(k-1)thenprintl$(k-1);:tl$="":goto1270
1240 ifk<39then1220
1250 print"[150]*[197][210][210]*";:pokes1+1,3:pokes1+4,33:l=l-1:goto830
1260 goto800
1270 ifmid$(t$,l+1,1)=" "thenprint" ";:l=l+1:goto1270
1280 ifsp=1then800
1290 return
1300 print"[159][208]ut 2 spaces before each [158]word."
1310 print"[159][208]ut 1 space before each [158]letter."
1320 print"[129][213]se the '"dt$"' and '"ds$"' keys."
1330 return
1340 print"":fort=1to12
1350 print"[159] ":next:print""
1360 print"[155] [212]ranslation is: ":poke199,1
1370 return
1380 print"":fort=1to12
1390 print"[159] ";:next:print""
1400 print"[155] [212]ranslation is: ";
1410 return
1420 print" [196]o you wish to quit to [158][204][207][193][196][211][212][193][210]? [152]([217]/[206])"
1430 geta$:ifa$=""then1430
1440 ifa$="[217]"ora$="y"then 1460
1450 ifa$="n"ora$="[206]"thenprint"";:goto 130
1460 open15,8,15,"r0:hello connect=hello connect":input#15,er,er$:close15
1470 ifer<>63 then print"[147]":end
1480 load"hello connect",8,1
1490 print"[144][147][158] *** [205]orse [195]ode [212]ests *** ":gosub390:tt=0
1500 print" [193].[